package com.example.familylibrary.repository;

import com.example.familylibrary.entity.BookEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface BookRepository extends JpaRepository<BookEntity, Long> {
    List<BookEntity> findByUserId(Long userId);
    List<BookEntity> findByUserIdAndTitleContaining(Long userId, String title);
    List<BookEntity> findByCategoryId(Long categoryId);
}